﻿using System;
using System.Text;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Data;
using Bangle.DBUtility;
namespace Bangle.DAL
{
    //Sys_Operation
    public partial class Sys_OperationDAL
    {
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int RoleId, int ModuleId, int OperationTypeId)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from Sys_Operation ");
            strSql.Append(" where RoleId=@RoleId and ModuleId=@ModuleId and OperationTypeId=@OperationTypeId");
            SqlParameter[] parameters = {
					new SqlParameter("@RoleId", SqlDbType.Int,4),
                    new SqlParameter("@ModuleId", SqlDbType.Int,4),
                    new SqlParameter("@OperationTypeId", SqlDbType.Int,4)
			};
            parameters[0].Value = RoleId;
            parameters[1].Value = ModuleId;
            parameters[2].Value = OperationTypeId;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

    }
}

